package net.bolue.sysmng.tblbean;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;


/**
 * 数字字典
 * @author Administrator
 *
 */
public class Dic extends TableBean{
	
	/**
	 * 子系统
	 */
	private String subSys;
	
	/**
	 * 字典组标识
	 */
	private Integer dicGrpId;
	
	/**
	 * 字典标识
	 */
	private Integer dicId;
	
	/**
	 * 字典描述
	 */
	private String dicDesc;
	
	/**
	 * 备注
	 */
	private String remark;
	
	public String getSubSys() {
		return subSys;
	}

	public void setSubSys(String subSys) {
		this.subSys = subSys;
	}

	public Integer getDicGrpId() {
		return dicGrpId;
	}

	public void setDicGrpId(Integer dicGrpId) {
		this.dicGrpId = dicGrpId;
	}

	public Integer getDicId() {
		return dicId;
	}

	public void setDicId(Integer dicId) {
		this.dicId = dicId;
	}

	public String getDicDesc() {
		return dicDesc;
	}

	public void setDicDesc(String dicDesc) {
		this.dicDesc = dicDesc;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public TableBean mapToEntry(Map<String, Object> map) {
		Dic dic = new Dic();
		Set<String> keySet = map.keySet();
		Iterator<String> keyIt = keySet.iterator();
		while(keyIt.hasNext()){
			String key = keyIt.next();
			Object o = map.get(key);
			if("SUBSYS".equals(key)){
				dic.setSubSys((String)o);
			} else if("DICGRPID".equals(key)){
				dic.setDicGrpId((Integer)o);
			} else if("DICID".equals(key)){
				dic.setDicId((Integer)o);
			} else if("DICDESC".equals(key)){
				dic.setDicDesc((String)o);
			} else if("REMARK".equals(key)){
				dic.setRemark((String)o);
			}
		}
		return dic;
	}

	@Override
	public String keyProps() {
		return "SUBSYS,DICGRPID,DICID";
	}

}
